package org.example.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: huang
 * @Date: 2021/8/24 11:29
 * @Description:
 */
@Controller
@RequestMapping("/test")

public class TestController {
    @RequestMapping("/1")
    public String t1() {
        return "redirect:/login.html";
    }

    @RequestMapping("/5")
    public ResponseEntity t5() {
        Map<String,Object> map = new HashMap<>();
        map.put("username","abc");
        map.put("password",123);
        return  ResponseEntity.status(200)
                .body(map);
    }
}
